home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Resources / Partition Logic 0.61 / partlogic-0.61.iso / system / headers / sys / errors.h < prev    next >
Text File  |  2006-01-31  |  4KB  |  91 lines

  1. // 
  2. //  Visopsys
  3. //  Copyright (C) 1998-2006 J. Andrew McLaughlin
  4. //  
  5. //  This library is free software; you can redistribute it and/or modify it
  6. //  under the terms of the GNU Lesser General Public License as published by
  7. //  the Free Software Foundation; either version 2.1 of the License, or (at
  8. //  your option) any later version.
  9. //
  10. //  This library is distributed in the hope that it will be useful, but
  11. //  WITHOUT ANY WARRANTY; without even the implied warranty of
  12. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
  13. //  General Public License for more details.
  14. //
  15. //  You should have received a copy of the GNU Lesser General Public License
  16. //  along with this library; if not, write to the Free Software Foundation,
  17. //  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. //
  19. //  errors.h
  20. //
  21.  
  22. // This file contains all of the standard error numbers returned by
  23. // calls to the Visopsys kernel (and by applications programs, if so 
  24. // desired).
  25.  
  26. #if !defined(_ERRORS_H)
  27.  
  28. // Items concerning severity for kernel errors
  29. typedef enum {
  30.   kernel_panic, kernel_error,  kernel_warn 
  31. } kernelErrorKind;
  32.  
  33. // This is the generic error
  34. #define ERR_ERROR          -1  // No additional error information
  35.  
  36. // These are the most basic, standard, catch-all error codes.  They're not
  37. // very specific or informative.  They're similar in name to some of the UNIX
  38. // error codes.
  39. #define ERR_INVALID        -2  // Invalid idea, generally
  40. #define ERR_PERMISSION     -3  // Permission denied
  41. #define ERR_MEMORY         -4  // Memory allocation or freeing error
  42. #define ERR_BUSY           -5  // The resource is in use
  43. #define ERR_NOSUCHENTRY    -6  // Generic things that don't exist
  44. #define ERR_BADADDRESS     -7  // Bad pointers
  45.  
  46. // These are a little bit more specific
  47. #define ERR_NOTINITIALIZED -8  // The resource hasn't been initialized
  48. #define ERR_NOTIMPLEMENTED -9  // Functionality that hasn't been implemented
  49. #define ERR_NULLPARAMETER  -10 // NULL pointer passsed as a parameter
  50. #define ERR_NODATA         -11 // There's no data on which to operate
  51. #define ERR_BADDATA        -12 // The data being operated on is corrupt
  52. #define ERR_ALIGN          -13 // Memory alignment errors
  53. #define ERR_NOFREE         -14 // No free (whatever is being requested)
  54. #define ERR_DEADLOCK       -15 // The action would result in a deadlock
  55. #define ERR_PARADOX        -16 // The requested action is paradoxical
  56. #define ERR_NOLOCK         -17 // The requested resource could not be locked
  57. #define ERR_NOVIRTUAL      -18 // Virtual address space error
  58. #define ERR_EXECUTE        -19 // Could not execute a command or program
  59. #define ERR_NOTEMPTY       -20 // Attempt to remove something that has content
  60. #define ERR_NOCREATE       -21 // Could not create an item
  61. #define ERR_NODELETE       -22 // Could not delete an item
  62. #define ERR_IO             -23 // Input/Output error
  63. #define ERR_BOUNDS         -24 // Array bounds exceeded, etc
  64. #define ERR_ARGUMENTCOUNT  -25 // Incorrect number of arguments to a function
  65. #define ERR_ALREADY        -26 // The action has already been performed
  66. #define ERR_DIVIDEBYZERO   -27 // You're not allowed to do this!
  67. #define ERR_DOMAIN         -28 // Argument is out of the domain of math func
  68. #define ERR_RANGE          -29 // Result is out of the range of the math func
  69. #define ERR_CANCELLED      -30 // Operation was explicitly cancelled
  70. #define ERR_KILLED         -31 // Process or operation was unexpectedly killed
  71. #define ERR_NOMEDIA        -32 // A removable disk has no media present.
  72.  
  73. // Things to do with files
  74. #define ERR_NOSUCHFILE     -33 // No such file
  75. #define ERR_NOSUCHDIR      -34 // No such directory
  76. #define ERR_NOTAFILE       -35 // The item is not a regular file
  77. #define ERR_NOTADIR        -36 // The item is not a directory
  78. #define ERR_NOWRITE        -37 // The item cannot be written
  79.  
  80. // Other things that don't exist
  81. #define ERR_NOSUCHUSER     -38 // The used ID is unknown
  82. #define ERR_NOSUCHPROCESS  -39 // The process in question does not exist
  83. #define ERR_NOSUCHDRIVER   -40 // There is no driver to perform an action
  84. #define ERR_NOSUCHFUNCTION -41 // The requested function does not exist
  85.  
  86. // Oops, it's the kernel's fault...
  87. #define ERR_BUG            -42 // An internal bug has been detected   
  88.  
  89. #define _ERRORS_H
  90. #endif
  91.